package com.example.wanandroid_copy2.ui.project.viewmodel

import android.app.Application
import androidx.lifecycle.MutableLiveData
import com.example.wanandroid_copy2.common.BaseResponse
import com.example.wanandroid_copy2.common.BaseViewModel
import com.example.wanandroid_copy2.ui.project.dao.ProjectRepository
import com.kkaka.wanandroid.project.data.ProjectRsp
import com.kkaka.wanandroid.project.data.ProjectTabRsp

class ProjectViewModel(application: Application) : BaseViewModel<ProjectRepository>(application) {

    var projectTabLiveData = MutableLiveData<BaseResponse<List<ProjectTabRsp>>>()
    var projectListLiveData = MutableLiveData<BaseResponse<ProjectRsp>>()


    fun getProjectTab() {
        mRepository.getProjectTab(projectTabLiveData)
    }

    fun getProjectList(uid: Int, page: Int) {
        mRepository.getProjectList(uid, page, projectListLiveData)
    }
}